package com.ruoyi.alarm.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import javax.validation.constraints.NotNull;
import lombok.Data;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 告警记录对象 alarm_warning
 *
 * @author yepanpan
 * @date 2025-03-13
 */
@Data
public class AlarmWarning extends BaseEntity
{
    public static final String HANDLE_UNDO = "0";
    public static final String HANDLE_DONE = "1";
    public static final String RESULT_MISS = "1";
    public static final String RESULT_REAL = "2";
    public static final String RESULT_TEST = "3";
    public static final String RESULT_MOCK = "4";
    private static final long serialVersionUID = 1L;

    /** 自增长主键ID */
    private Long id;

    /** 组织ID */
    @Excel(name = "组织ID")
    @NotNull
    private Long deptId;

    /** 设备ID */
    @Excel(name = "设备ID")
    @NotNull
    private Long deviceId;
    //private BaseDevice baseDevice;

    /** 设备分类 */
    @Excel(name = "设备分类")
    private String deviceTypeName;
    @NotNull
    private Long deviceTypeId;
    private String deviceTypeCode;

    /** 设备分类 */
    @Excel(name = "设备分类")
    private String deviceSysName;
    @NotNull
    private Long deviceSysId;
    private String deviceSysCode;

    /** 事件类型 */
    @Excel(name = "事件类型")
    private String alarmTypeName;
    @NotNull
    private String alarmType;
    private AlarmType type;

    /** 告警时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "告警时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @NotNull
    private Date alarmTime;

    /** 告警图片 */
    @Excel(name = "告警图片")
    private String imagePath;

    /** 告警视频 */
    @Excel(name = "告警视频")
    private String videoPath;

    /** 设备编码 */
    @Excel(name = "设备编码")
    @NotNull
    private String deviceCode;

    /** 设备位置 */
    @Excel(name = "设备位置")
    @NotNull
    private String position;

    /** 事件代码 */
    @Excel(name = "事件代码")
    @NotNull
    private String eventCode;

    /** 告警说明 */
    @Excel(name = "告警说明")
    private String comment;

    /** 处置状态 */
    @Excel(name = "处置状态", dictType="handle_status", comboReadDict=true)
    private String handleStatus;

    /** 处置结论 */
    @Excel(name = "处置结论", dictType="handle_result", comboReadDict=true)
    private String handleResult;

    /** 处置时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "处置时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date handleTime;

    /** 处置人 */
    private Long handleUserId;

    /** 处置人姓名 */
    @Excel(name = "处置人姓名")
    private String handleUserName;

    /** 处置说明 */
    @Excel(name = "处置说明")
    private String handleRemark;

    /** 外部告警代码 */
    private String alarmCode;

    /** 撤销时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "撤销时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date repealTime;


}
